<style>
    .ace_editor {
        height: 500px;
    }
</style>

<div class="hbox hbox-auto-xs hbox-auto-sm" ng-init="
    app.settings.asideFolded = false;
    app.settings.asideDock = false;">
    <!-- main -->
    <div class="col">
        <!-- main header -->
        <div class="bg-light lter b-b wrapper-md">
            <div class="row">
                <div class="col-sm-6 col-xs-12">
                    <h1 class="m-n font-thin h3 text-black">Grafana用户帮助</h1>
                </div>
            </div>
        </div>
        <!-- / main header -->
        <div class="wrapper-md">
            <!-- toaster directive -->
            <toaster-container
                    toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
            <!-- / toaster directive -->

            <uib-tabset>
                <div ng-controller="grafanaCtrl">
                    <div style="margin-top: 5px;" class="panel">
                        <div class="panel-body">
                            <form class="form-horizontal col-md-12" style="box-shadow: 0 0 5px #ddd;padding: 10px;">
                                <div ng-show="!mdEditing" ng-bind-html="md.preview"></div>

                                <div ng-show="mdEditing" ui-ace="aceOption" ng-model="md.mdBody"
                                     class="ace_editor"></div>
                            </form>
                        </div>


                        <div class="form-group" style="text-align:center;">
                            <button class="btn btn-xs" ng-show="!mdEditing"
                                    style="margin-right: 5px; background-color: #2b669a; color: white;"
                                    ng-click="editMD()">
                                <i class="glyphicon glyphicon-edit"></i>编辑公告
                            </button>

                            <button class="btn btn-xs" ng-show="mdEditing"
                                    style="margin-right: 5px; background-color: #ff8700; color: white;"
                                    ng-click="saveMD()">
                                <i class="glyphicon glyphicon-ok"></i>保存公告
                            </button>
                        </div>
                    </div>
                </div>
            </uib-tabset>
        </div>
    </div>
    <!-- / main -->
</div>

